package org.example;

import org.example.job.TestJob;
import org.rcy.framework.job.elastic.JobManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
//import org.springframework.integration.annotation.IntegrationComponentScan;

/**
 * @author 吴康桥
 * @Description
 * @date 2022/9/29 11:13
 */

@SpringBootApplication
//@IntegrationComponentScan(basePackages = {"org.rcy.framework"})
public class TestApplication {
	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(TestApplication.class, args);
		context.registerShutdownHook();

		JobManager jobManager = context.getBean(JobManager.class);
		TestJob testJob = context.getBean(TestJob.class);
		jobManager.addJob(testJob);
	}
}
